package cn.tedu.review;
/*复写单例设计模型*/
public class Singleton1 {
    public static void main(String[] args) {
        Mysingle s1 = Mysingle.getSingle();
        Mysingle s2 = Mysingle.getSingle();
        System.out.println(s1);
        System.out.println(s2);

        //System.out.println(Mysingle.single);
    }
}
class Mysingle{
    private Mysingle() {}
    private static Mysingle single=new Mysingle();
    static public Mysingle getSingle(){
        return single;
    }
}